package com.wiboson.money.DataSource;

import com.wiboson.money.Base.NetWork;
import com.wiboson.money.DataSource.model.NowInfo;


/**
 * Created by moon on 17/4/27.
 */
public class todaySource {


    public static NowInfo getNowData(char type,int num){
        NowInfo nowInfo= new NowInfo();
        if(type =='1'){
            nowInfo.buildBySina(NetWork.sendGet("http://hq.sinajs.cn/list=sh"+String.format("%06d", num),"GBK"));
        }else if(type == '2'){
            nowInfo.buildBySina(NetWork.sendGet("http://hq.sinajs.cn/list=sz"+String.format("%06d", num),"GBK"));
        }else {
            return null;
        }
        return nowInfo;
    }



}
